<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<style>
    div{
        width: 600px;
        height: 400px;
        /* background: pink; */
        margin: 20px auto;
        text-align: center;
    }
</style>
<body>
   <div>
    <input type="text" value="北京市"><br>
    <input type="text" value="朝阳区"><br>
    <button>传参</button>
   </div>
</body>
</html>
<script>
    var put=document.querySelectorAll('input')
    var btn=document.querySelector('button')
    btn.onclick=function(){
       if(put[0].value == '北京市' || put[1].value=='朝阳市'){
           alert('北京市')
            alert('朝阳市')
       }
    }
</script>